package org.stvd.common;

import java.io.File;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;

/**
 * 系统常量配置类
 * 
 * @author houzx
 */
public class Consts {

    /** 系统GUID，关联菜单-角色-参数等信息 */
    public static String GUID = "SYS_UUMS_PLATFORM";

    /** 系统访问网址 */
    public static String SYSTEM_URL = "";

    /** 全局系统名称，系统中登录、页面头部系统名称 */
    public static String SYSTEM_NAME = "通用项目开发框架";

    /** 每页请求最大数 */
    public static Integer PAGE_SIZE = 20;

    /** 系统默认注册用户角色编码(系统数据库变更后注意联动变更) */
    public static String DEFAULT_USER_ROLE_CODE = "ROLE_REGISTER";

    /** 系统默认注册用户机构编码(系统数据库变更后注意联动变更) */
    public static String DEFAULT_USER_DEP_CODE = "999999";

    /** 自动登录标识 */
    public static final boolean AUTO_LOGIN = false;

    /** 单点登录cookie域名 */
    public static final String DOMAIN_NAME = "127.0.0.1";

    /** 单点登录cookieKey值 */
    public static final String COOKIE_KEY = Base64.getEncoder().encodeToString("SYSTEM_LOGIN_USER".getBytes())
            .replace("=", "");

    public static Map<String, Object> GLOBAL_MAP = new HashMap<String, Object>();

    public static String[] BASE_PAGE_FILTER_PATHS = {};

    /** 邮箱服务器地址：163是smtp.163.com；qq是smtp.exmail.qq.com */
    public static final String emailHost = "smtp.163.com";

    /** 邮件发送地址 */
    public static final String emailFrom = "";

    /** 邮件发送者邮箱登录名 */
    public static final String emailUsername = "";

    /** 邮箱授权码 */
    public static final String emailPassword = "";

    /** 通用成功标识 */
    public static final String SUCCESS = "0";

    /** 通用失败标识 */
    public static final String FAIL = "1";

    /** 通用操作成功标识 */
    public static final String OPER_SUCCESS = "Success";

    /** 通用操作失败标识 */
    public static final String OPER_FAIL = "Error";

    /** 文件上传文件夹 */
    public static String UPLOAD_FOLDER = "/upload/";

    /** 文件下载文件夹 */
    public static String DOWNLOAD_FOLDER = "download" + File.separator;

    /** Linux文件路径 */
    public static String LINUX_PATH = "home" + File.separator + "data" + File.separator;

    /** Window文件路径 */
    public static String WINDOW_PATH = "D:/data/";

}
